﻿using Microsoft.AspNetCore.Mvc;
using XinLife.Application.Interface;
using XinLife.Core.Caches;
using XinLife.Core.Model;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace XinLife.Controllers.Report
{
    /// <summary>
    /// 登陆日志
    /// </summary>
    public class LoginInfoController : BaseController
    {
        private ILoginInfoService  _loginInfoService;
        public LoginInfoController(ILoginInfoService  loginInfoService)
        {
            _loginInfoService = loginInfoService;
        }
        /// <summary>
        /// 获取登陆日志列表
        /// </summary>
        [HttpGet]
        [Cacheable(1)] // 缓存时间设置为1分钟
        public async Task<object> GetLoginInfoPageList([FromQuery] Pagination pagination, [FromQuery] string queryJson = null)
        {
            return await _loginInfoService.GetLoginInfoPageList(pagination, queryJson);
        }
    }
}
